package com.hg.design.behavior.visitor.biancheng.ex3;

//具体元素:叶子元素
public class LeafElement implements Element {
    private String name;

    public LeafElement(String name) {
        this.name = name;
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    public String operation() {
        return "叶子元素" + this.name + "操作。";
    }
}
